import {http} from "@/interceptor/luch-request/index.js"
// 新增宝宝
export const save = (data) => {
    return http.post("api/admin/student/v1/saveStudent", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}
// 宝宝列表
export const page = (data) => {
	return http.get("api/admin/student/v1/pageStudent", {
		data: data
	});
}

 // 删除
export const del = (data) => {
    return http.delete("api/admin/student/v1/deleteStudent",data,{
		header:{
			"content-type": "application/json"
		}
	});	
}
 
// 编辑
export const update = (data) => {
    return http.put("api/admin/student/v1/updateStudent",data,{
		header:{
			"content-type": "application/json"
		}
	});	
} 

// 重回校园宝宝
export const back = (data) => {
    return http.put("api/admin/student/v1/backSchool",data,{
		header:{
			"content-type": "application/json"
		}
	});	
}


// 宝宝离园
export const leaveStudent = (data) => {
    return http.put("api/admin/student/v1/leaveStudent",data,{
		header:{
			"content-type": "application/json"
		}
	});	
}

// 宝宝调班
export const shiftClass = (data) => {
    return http.post("api/admin/student/v1/shiftClass", data,{
	header:{
			"content-type": "application/json"
		}
	});	
}

//调班历史
export const record = (data) => {
	return http.get("api/admin/student/v1/record", {
		data: data
	});
}

// 宝贝详情
export const studentInfo = (id) => {
 	return http.get("api/admin/student/v1/studentInfo/"+id, {
 		header:{
 			"content-type": "application/x-www-form-urlencoded"
 		}
 	});
}

//根据家长id查询学生
export const getStudent = (data) => {
	return http.get("api/admin/student/v1/getStudent", {
		data: data
	});
}

export const birthdayPrompter = (data) => {
	return http.get("api/admin/student/v1/birthdayPrompter", {
		data: data
	});
}
